package com.hbx.platform.base.query;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author: hbx
 * @date: 2024/04/02
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class BaseQuery {
    //当前页
    private Integer currentPage = 1;
    //记录数
    private Integer pageSize = 10;
    //模糊查询
    private String keyword;

    //能直接作用于SQL
    public Integer getStartIndex(){
        return (currentPage-1)*pageSize;
    }
}
